clear

**import CombinedSubsetData_2023_Anon.xlsx**

****************************************
***Generate Means for Efficacy Scores***
****************************************

mean(efficacy) if post == 1 & year == 2019
mean(efficacy) if post == 0 & year == 2019
mean(efficacy) if post == 1 & year == 2020
mean(efficacy) if post == 0 & year == 2020

*******************************************************
***Generate Means for Community Consciousness Scores***
*******************************************************

destring communityall, replace
mean(communityall) if post == 1 & year == 2019
mean(communityall) if post == 0 & year == 2019
mean(communityall) if post == 1 & year == 2020
mean(communityall) if post == 0 & year == 2020

*****************************************
***Generate Means for Knowledge Scores***
*****************************************
mean(knowledge) if post == 1 & year == 2019
mean(knowledge) if post == 0 & year == 2019
mean(knowledge) if post == 1 & year == 2020
mean(knowledge) if post == 0 & year == 2020

****************************************************
***Generate Means for Verifiable Knowledge Scores***
****************************************************

mean(knowver) if post == 1 & year == 2019
mean(knowver) if post == 0 & year == 2019
mean(knowver) if post == 1 & year == 2020
mean(knowver) if post == 0 & year == 2020

****************************************************
***Generate Means for Knowledge Confidence Scores***
****************************************************

mean(knowcon) if post == 1 & year == 2019
mean(knowcon) if post == 0 & year == 2019
mean(knowcon) if post == 1 & year == 2020
mean(knowcon) if post == 0 & year == 2020

********************************************
********************************************
****Estimating difference in difference*****
********************************************
********************************************

***Margins***
regress knowledge i.post##i.treated
margins treated#post, post coeflegend

regress efficacy i.post##i.treated
margins treated#post, post coeflegend

regress communityall i.post##i.treated
margins treated#post, post coeflegend


***table***
regress knowledge i.post##i.treated
outreg2 using mfvappendix.doc, nolabel replace

regress knowver i.post##i.treated
outreg2 using mfvappendix.doc, nolabel append

regress knowcon i.post##i.treated
outreg2 using mfvappendix.doc, nolabel append

regress efficacy i.post##i.treated
outreg2 using mfvappendix.doc, nolabel append

regress communityall i.post##i.treated
outreg2 using mfvappendix.doc, nolabel append



outreg2 using mfvappendix.doc, nolabel append



